package  com.na.onlineservey.interview
import com.docu.common.Action
import com.docu.common.Message
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component
import com.na.onlineservey.InterviewService

@Component("deleteInterviewAction")
class DeleteInterviewAction extends Action {

  @Autowired
  InterviewService interviewInstanceService

   public Object preCondition(Object params, Object object) {
    //not implement
    return null
  }

   public Object postCondition(Object params, Object object) {
    //not implement
    return null
  }

   public Object execute(Object params, Object object) {
    try {
      return interviewInstanceService.delete(object)
    }
    catch (Exception ex) {
    log.error(ex.message)
      return new Integer(0)
    }
  }

}